Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New changes metamanifest #38

Closed
wants to merge 16 commits into from

Conversation

angelos-p
Copy link
Contributor

This PR is for a GSoC project based on GLEP:58

Added more MANIFEST_IDENTIFIERS in pym/portage/const.py according to GLEP:60

Modified guessManifestType() for the new MANIFEST_IDENTIFIERS and reduced the return statements

Updated some variable names in /pym/portage/manifest.py

Added a new file /pym/portage/meta-manifest.py which includes a subclass of Manifest for manifest files outside of the packages (ex. /profiles, categories etc)

Added 4 create_ functions for it, create_cat() that creates a metamanifest for categories that includes the manifest files of all packages after verifying them, create_profile and create_eclass that create a metamanifest for the /profiles and /eclass directories, and create_master that creates a metamanifest file that includes all the metamanifests above and all files in the root directory.

Added signature and manifest verification to the metamanifest files which verifies package manifests only if a boolean is passed and ignores missing categories or packages if the whole directory is missing.

Modified the checkFileHashes() method in the subclass to ignore DIST files because otherwise package manifests wouldn't be verifiable.

Added some methods to help me identify things like the repolevel, reporoot and repotype.

Modified the create() function to choose which create_ function to use based on the repotype.

Instructions on how to use the script: https://goo.gl/i0LIay
Test cases: https://wiki.gentoo.org/wiki/User:Aeroniero

@dol-sen
Copy link
Contributor

dol-sen commented Jul 28, 2016

the test failure looks like was only the lack of the new gkeys dep... somehting that should be ready by end of GSOC... there are some other changes to add for using it to come.

@angelos-p
Copy link
Contributor Author

@dastergon

else:
self.checkFileHashes('MANIFEST', f, ignoreMissing=False)
if verify_pkgs:
new_mfpath = os.path.join(mfdir, f.replace("Manifest", ""))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's kind of an odd use of replace. This seems more appropriate

new_mfpath = os.path.dirname(os.path.join(mfdir, f))

else:
raise portage.exception.PortageException("!!! gpg exited with '" + str(return_code) + "' status")

def find_reporoot(self):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the reporoot and the repolevel should be constructor parameters, since it's very inefficient for each Manifest instance to have to figure this stuff out automatically.

@zmedico
Copy link
Member

zmedico commented Nov 26, 2017

GLEP 58 has been replaced by GLEP 74 which is already implemented on the infrastructure side. See bug 638908.

@zmedico zmedico closed this Nov 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants