Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 185231
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Portage team <dev-portage@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Kevin Blair <kaziya@rogers.com>
Add CC:
CC:
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
elog-mail-action.diff Patch to export a ${ACTION} variable in MAILSUBJECT patch Marius Mauch (RETIRED) 2007-07-16 04:59 0000 1.00 KB Details | Diff
elog-mail-action.diff Patch that correctly sets ACTION=unmerged patch Marius Mauch (RETIRED) 2007-07-16 09:43 0000 1002 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 185231 depends on: Show dependency tree
Bug 185231 blocks: 210077 216231
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2007-07-13 20:14 0000
i recently setup portage ELOG to email me emerge logs, and I'm using the
MAILSUBJECT option to indicate what the message was per package and i noticed
that it sends logs for both emerges and unmerge process, in the documentation
there doesn't seem to be a "portage process" variable to indicate if it was a
unmerge or merge, so if i use the suggested
PORTAGE_ELOG_MAILSUBJECT="package \${PACKAGE} merged on \${HOST} with notice"
i get told package A was merged on HostA with notices, when it was realy
unmerged

so extra variables such as one to indicate if it was merged or not would make
the elog mail messages less confusing.


Reproducible: Always




i do not be leave that there is any further information that would explain the
feature i am suggesting.

------- Comment #1 From Marius Mauch (RETIRED) 2007-07-16 04:59:01 0000 -------
Created an attachment (id=124990) [details]
Patch to export a ${ACTION} variable in MAILSUBJECT

Please try the attached patch. It adds support for a ${ACTION} variable in
PORTAGE_ELOG_MAILSUBJECT that contains either "merged", "unmerged" or "unknown"
(though the last case shouldn't happen AFAICT).
You can apply it with
patch /usr/lib/portage/pym/elog_modules/mod_mail.py <
/path/to/elog-mail-action.diff

------- Comment #2 From Kevin Blair 2007-07-16 07:19:29 0000 -------
applied the patch as instructed how ever on testing i got merged for package
merges but unkownen for unmerges im not sure if it matters that the unmerge
came from an update ie

i updated sys-apps/file
which put it from 
sys-apps/file-4.21
to 
sys-apps/file-4.21-r1
so portage usual it installs the 4.21-r1 copy and when finishes it runs an
unmerge on the remaining 4.21 install and this is a case this patch gave
unknown

possibly the test to test to see if it was not an unmerge and unknown instead,
its seeing all unmerges as unknown, at least thats my guess cause i don't know
the inner workings of portage and i don't know python so i cant really fix or
debug it that well.

thanks for the patch and quick response with a fix!!

Kevin

(In reply to comment #1)
> Created an attachment (id=124990) [edit] [details]
> Patch to export a ${ACTION} variable in MAILSUBJECT
> 
> Please try the attached patch. It adds support for a ${ACTION} variable in
> PORTAGE_ELOG_MAILSUBJECT that contains either "merged", "unmerged" or "unknown"
> (though the last case shouldn't happen AFAICT).
> You can apply it with
> patch /usr/lib/portage/pym/elog_modules/mod_mail.py <
> /path/to/elog-mail-action.diff
> 

------- Comment #3 From Marius Mauch (RETIRED) 2007-07-16 09:43:36 0000 -------
Created an attachment (id=125002) [details]
Patch that correctly sets ACTION=unmerged

Oops, had a stupid bug in the patch, here is a fixed version.
And don't thank me yet, I haven't decided if I like this or not.

------- Comment #4 From Kevin Blair 2007-07-16 10:17:16 0000 -------
did same test, patch worked as expected, you may say not to thank you but i am
anyway because i can use this even if it isn't "officially" implemented in
portage, i have 5 systems soon to be 6 to monitor available updates(with a bash
script i built) and using this with elog its less confusing when there is
50-100 some e-mails to go through(and i can sort out the unmerges if
necessary).

so thank you very much, and if you create new versions of the patch ill apply
and test them asap.

Kevin

(In reply to comment #3)
> Created an attachment (id=125002) [edit] [details]
> Patch that correctly sets ACTION=unmerged
> 
> Oops, had a stupid bug in the patch, here is a fixed version.
> And don't thank me yet, I haven't decided if I like this or not.
> 

(In reply to comment #3)
> Created an attachment (id=125002) [edit] [details]
> Patch that correctly sets ACTION=unmerged
> 
> Oops, had a stupid bug in the patch, here is a fixed version.
> And don't thank me yet, I haven't decided if I like this or not.
> 

------- Comment #5 From Marius Mauch (RETIRED) 2007-10-06 16:37:00 0000 -------
Looks like I've commited this already.

------- Comment #6 From Marius Mauch (RETIRED) 2008-03-20 18:14:52 0000 -------
This is supposed to be fixed in portage-2.2_pre5 or earlier.

------- Comment #7 From Marius Mauch (RETIRED) 2008-03-20 18:15:30 0000 -------
This is supposed to be fixed in portage-2.2_pre5 or earlier.

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug