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
64e8c228
Commit
64e8c228
authored
Aug 02, 2013
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fix: only send updated package list once
parent
4a17ed2b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
APT.pm
PVE/API2/APT.pm
+6
-1
No files found.
PVE/API2/APT.pm
View file @
64e8c228
...
...
@@ -163,7 +163,7 @@ my $update_pve_pkgstatus = sub {
my
$notify_status
=
{};
my
$oldpkglist
=
&
$read_cached_pkgstatus
();
foreach
my
$pi
(
@$oldpkglist
)
{
$notify_status
->
{
$pi
->
{
Package
}}
=
$pi
->
{
Version
};
$notify_status
->
{
$pi
->
{
Package
}}
=
$pi
->
{
NotifyStatus
};
}
my
$pkglist
=
[]
;
...
...
@@ -349,7 +349,10 @@ __PACKAGE__->register_method({
$data
.=
"
The following updates are available:
\n\n
";
my
$count
=
0
;
foreach
my
$p
(
sort
{
$a
->
{
Package
}
cmp
$b
->
{
Package
}
}
@$pkglist
)
{
next
if
$p
->
{
NotifyStatus
}
&&
$p
->
{
NotifyStatus
}
eq
$p
->
{
Version
};
$count
++
;
if
(
$p
->
{
OldVersion
})
{
$data
.=
"
$p
->{Package}:
$p
->{OldVersion} ==>
$p
->{Version}
\n
";
}
else
{
...
...
@@ -357,6 +360,8 @@ __PACKAGE__->register_method({
}
}
return
if
!
$count
;
my
$fh
=
IO::
File
->
new
("
|sendmail -B 8BITMIME
$mailto
")
||
die
"
unable to open 'sendmail' - $!
";
...
...
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