adding changes- adding a new package functionality is done but entirely untested. still missing __main__

This commit is contained in:
brent s 2016-11-13 18:44:59 -05:00
parent 6cd444e8d1
commit fe6f5f2f45
2 changed files with 24 additions and 1 deletions

View File

@ -47,7 +47,10 @@ def gui_init():
"Bazaar (bzr)"] "Bazaar (bzr)"]
vcs_menu = m.menu("What type of VCS system?", vcs_options, "VCS type ('q' to quit):") vcs_menu = m.menu("What type of VCS system?", vcs_options, "VCS type ('q' to quit):")
pkg['name'] = input("\nWhat is the name of your package? (Exclude the '-git' etc. suffix, that will be added automatically later on)\n").lower() pkg['name'] = input("\nWhat is the name of your package? (Exclude the '-git' etc. suffix, that will be added automatically later on)\n").lower()
srcurl = input("\nWhat is the checkout URL for {0}?\n(Do not include the directory or VCS type prefix as per\nhttps://wiki.archlinux.org/index.php/VCS_package_guidelines#VCS_sources ...\nit will be added automatically)\n".format(pkg['name'])) srcurl = input("\nWhat is the checkout URL for {0}?\n" +
"(Do not include the directory or VCS type prefix as per\n" +
"https://wiki.archlinux.org/index.php/VCS_package_guidelines#VCS_sources ...\n" +
"it will be added automatically)\n".format(pkg['name']))
pkg['vcstype'] = ["git", pkg['vcstype'] = ["git",
"svn", "svn",
"hg", "hg",
@ -181,6 +184,19 @@ def aur_create(pkg):


## ADD THE SUBMODULE TO THE MAIN AUR TREE ## ## ADD THE SUBMODULE TO THE MAIN AUR TREE ##
def aur_submodule(pkg): def aur_submodule(pkg):
aur_pkgs_repo = git.Repo(aur_pkgs_dir)
aur_pkgs_repo.create_submodule(pkg['name'],aur_pkgs_dir + '/' + pkg['name'],url='aur@aur.archlinux.org:' + pkg['name'])
aur_pkgs_repo.index.commit("adding {0}".format(pkg['name']))
# Comment me out if you don't have access to upstream:
aur_pkgs_repo.push()
# And don't forget to add the hook to make life easier for us in the future.
# WARNING: HERE BE POSSIBLE RACE CONDITIONS
mod_gitdir = aur_pkgs_repo.submodules[-1].module().git_dir
if not aur_pkgs_repo.submodules[-1].module().git_dir.endswith(pkg['name']):
exit('SOMETHING FUCKED UP BADLY. Do not run this thing in parallel.')
else:
pass
shutil.copy2(aur_pkgs_dir + '/_docs/PKGBUILD.templates.d.python/pre-commit.hook.sh', mod_gitdir + '/hooks/pre-commit', follow_symlinks = True)
print() print()


#pprint.pprint(gui_init()) #pprint.pprint(gui_init())

View File

@ -0,0 +1,7 @@
#!/bin/bash

#!/bin/bash

/usr/bin/mksrcinfo

git add .SRCINFO