Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 559894 - Updated-for-git "Package Additions/Removals" mailer scripts
Summary: Updated-for-git "Package Additions/Removals" mailer scripts
Status: UNCONFIRMED
Alias: None
Product: Gentoo Infrastructure
Classification: Unclassified
Component: Git (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Infrastructure
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-07 17:44 UTC by Malcolm Lashley
Modified: 2015-10-02 14:51 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Replacement python script (find-git-adds-and-removals.py,3.76 KB, text/x-python)
2015-09-07 17:44 UTC, Malcolm Lashley
Details
Replacement shell-wrapper (find-git-adds-and-removals-process.sh,957 bytes, application/x-shellscript)
2015-09-07 17:45 UTC, Malcolm Lashley
Details
Replacement python script v2 (find-git-adds-and-removals.py,3.73 KB, text/x-python)
2015-09-07 18:17 UTC, Malcolm Lashley
Details
Replacement python script v3 (find-git-adds-and-removals.py,3.73 KB, text/x-python)
2015-09-14 00:54 UTC, Malcolm Lashley
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Malcolm Lashley 2015-09-07 17:44:29 UTC
Created attachment 411286 [details]
Replacement python script

Per Robin's request in [1] I updated the scripts and provided them in replies to that thread[2], and later cc: Robin. [3]

Since he's presumably busy - and tracking multiple revisions of scripts in e-mail is a pain - opening this bug to track.





[1] https://archives.gentoo.org/gentoo-dev/message/0fc5dc1915ba1d6b28f7d8674b95a91f
[2] https://archives.gentoo.org/gentoo-dev/message/32879869bb516c82e565650a7908c418
[3] https://archives.gentoo.org/gentoo-dev/message/329fede3822a98e30a5781d0fc917fd9
Comment 1 Malcolm Lashley 2015-09-07 17:45:08 UTC
Created attachment 411288 [details]
Replacement shell-wrapper
Comment 2 Malcolm Lashley 2015-09-07 18:17:11 UTC
Created attachment 411290 [details]
Replacement python script v2

Fixes some date comments made by titanofold/kentfredric on the gentoo-dev thread.
Comment 3 Malcolm Lashley 2015-09-14 00:54:15 UTC
Created attachment 411864 [details]
Replacement python script v3

Use committer (%cE), rather than author (%aE) since we simplified to remove the @... part of the e-mail assuming @gentoo.org
Comment 4 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2015-09-28 01:22:28 UTC
The tweaked version of this is now live, but there is a major problem I see:
you're detecting Manifest addition/removal as a package being added/removed, but that is NO longer accurate with thin Manifests.

If the package has no distfiles, there will be NO thin Manifest. It needs to be detecting the addition of a directory, not just the files.
Comment 5 Malcolm Lashley 2015-10-02 14:51:55 UTC
Hey Robin, sorry for the delay in response - been in India w/work for 10 days.
I see your point, I hadn't considered thin-manifest.

I've had a look, but my jet-lagged brain can't seem to see a way to make git log output the fact that directories were added, it seems to be implied.

Everything *should* have metadata.xml tho, right?[1] Which means you can just s/Manifest/metadata.xml/ in the python script

-new_package     = re.compile("^A\s+(.*)\/(.*)\/Manifest$")
-removed_package = re.compile("^D\s+(.*)\/(.*)\/Manifest$")

+new_package     = re.compile("^A\s+(.*)\/(.*)\/metadata.xml$")
+removed_package = re.compile("^D\s+(.*)\/(.*)\/metadata.xml$")

I tested this and it does pick up an additional 

> net-misc/connman-ui                      2015-09-29 20:49:35  hasufell      f77f4fa

compared to the Manifest-based version - and that *is* a GIT-only ebuild with no distfiles.

BTW Did you push the code to some infra repo? It would make sending patches easier :)

Cheers,
malc.


[1] Used this hack to dump <cat/pn>'s without metadata.xml and found none

for i in `find ./  -wholename "*/*" -type d  | grep  "/.*/" | grep -v "/.*/.*/"` ; do ls $i/metadata.xml >/dev/null; done


[1]