Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pve-manager
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
pve-manager
Commits
7cb07c3d
Commit
7cb07c3d
authored
Jun 18, 2013
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avoid warning about uninitialize values
And log a message to syslog when we update the package list.
parent
1163ee63
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
APT.pm
PVE/API2/APT.pm
+3
-1
No files found.
PVE/API2/APT.pm
View file @
7cb07c3d
...
@@ -119,6 +119,8 @@ my $pve_pkgstatus_fn = "/var/lib/pve-manager/pkgupdates";
...
@@ -119,6 +119,8 @@ my $pve_pkgstatus_fn = "/var/lib/pve-manager/pkgupdates";
my
$update_pve_pkgstatus
=
sub
{
my
$update_pve_pkgstatus
=
sub
{
syslog
('
info
',
"
update new package list:
$pve_pkgstatus_fn
");
my
$pkglist
=
[]
;
my
$pkglist
=
[]
;
my
$cache
=
&
$get_apt_cache
();
my
$cache
=
&
$get_apt_cache
();
...
@@ -173,7 +175,7 @@ __PACKAGE__->register_method({
...
@@ -173,7 +175,7 @@ __PACKAGE__->register_method({
my
$st2
=
File::stat::
stat
("
/var/cache/apt/pkgcache.bin
");
my
$st2
=
File::stat::
stat
("
/var/cache/apt/pkgcache.bin
");
my
$st3
=
File::stat::
stat
("
/var/lib/dpkg/status
");
my
$st3
=
File::stat::
stat
("
/var/lib/dpkg/status
");
if
(
$st2
->
mtime
<=
$st1
->
mtime
&&
$st3
->
mtime
<=
$st1
->
mtime
)
{
if
(
$st2
&&
$st3
&&
$st2
->
mtime
<=
$st1
->
mtime
&&
$st3
->
mtime
<=
$st1
->
mtime
)
{
my
$data
;
my
$data
;
eval
{
eval
{
my
$jsonstr
=
PVE::Tools::
file_get_contents
(
$pve_pkgstatus_fn
,
5
*
1024
*
1024
);
my
$jsonstr
=
PVE::Tools::
file_get_contents
(
$pve_pkgstatus_fn
,
5
*
1024
*
1024
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment