diff --git a/.gitmodules b/.gitmodules index 246ca6b..55fcfbf 100644 --- a/.gitmodules +++ b/.gitmodules @@ -160,4 +160,6 @@ [submodule "python-validators"] url = aur@aur.archlinux.org:bdisk-git path = python-validators +[submodule "bdisk-git"] url = aur@aur.archlinux.org:bdisk-git + path = bdisk-git diff --git a/_bin/new_package.py b/_bin/new_package.py index 482e5a0..43ae920 100755 --- a/_bin/new_package.py +++ b/_bin/new_package.py @@ -50,15 +50,16 @@ def gui_init(): "Bazaar (bzr)"] 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() - srcurl = input("\nWhat is the checkout URL for {0}?\n" + + 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'])) + "it will be added automatically)\n").format(pkg['name'])) pkg['vcstype'] = ["git", "svn", "hg", "bzr"] - pkg['srcurl'] = pkg['name'] + "::" + pkg['vcstype'][vcs_menu-1] + srcurl + pkg['vcstype'] = pkg['vcstype'][vcs_menu-1] + pkg['srcurl'] = pkg['name'] + "::" + pkg['vcstype'] + '+' + srcurl pkg['name'] = pkg['name'] + "-" + pkg['vcstype'] pkg['type'] = 'vcs' pkg['srcfile'] = False @@ -186,7 +187,7 @@ def aur_create(pkg): # and push... aur_repo.remotes.origin.push() # and delete the repo and source file - shutil.rmtree(repo_dir) + #shutil.rmtree(repo_dir) if pkg['srcfile']: os.remove(pkg['src_dl']) diff --git a/_bin/remove.submodule.sh b/_bin/remove.submodule.sh new file mode 100755 index 0000000..61e07e5 --- /dev/null +++ b/_bin/remove.submodule.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +# TODO- incorporate into python script + +if [[ -z "${1}" ]]; +then + echo "USAGE: ${0} " + exit 1 +fi + +PKG=${1} +PROJPATH='/opt/dev/arch' + +cd ${PROJPATH} + +# .gitmodules string to match: +#[submodule "bdisk-git"] +# url = aur@aur.archlinux.org:bdisk-git +# path = bdisk-git +sed -i -e "/^[[:space:]]*\[submodule \"${PKG}\"\]$/d" -e "/^[[:space:]]*path[[:space:]]*=[[:space:]]*${PKG}$/d" .gitmodules +git add .gitmodules + +# .git/config string to match: +#[submodule "bdisk-git"] +# url = aur@aur.archlinux.org:bdisk-git +sed -i -e "/^[[:space:]]*\[submodule \"${PKG}\"\]$/d" -e "/^[[:space:]]*url[[:space:]]*=[[:space:]]*aur@aur\.archlinux\.org:${PKG}$/d" .git/config + +git rm --cached ${PKG} + +rm -rf .git/modules/${PKG} + +git commit -m "removed ${PKG} submodule" +rm -rf ${PKG} diff --git a/_docs/PKGBUILD.templates.d.python/release.all.j2 b/_docs/PKGBUILD.templates.d.python/release.all.j2 index e1a2de0..f229108 100644 --- a/_docs/PKGBUILD.templates.d.python/release.all.j2 +++ b/_docs/PKGBUILD.templates.d.python/release.all.j2 @@ -1,3 +1,2 @@ -{% for tpl in pkgbuild_list %} -{% include tpl %} +{% for tpl in pkgbuild_list %}{% include tpl %} {% endfor %} diff --git a/_docs/PKGBUILD.templates.d.python/srcinfo.j2 b/_docs/PKGBUILD.templates.d.python/srcinfo.j2 index e9293f9..e6e4367 100644 --- a/_docs/PKGBUILD.templates.d.python/srcinfo.j2 +++ b/_docs/PKGBUILD.templates.d.python/srcinfo.j2 @@ -10,7 +10,7 @@ pkgbase = {{ pkg['name'] }} license = {{ license }}{% endfor %}{% if pkg['deps'] is defined and pkg['deps']|length > 0 %}{% for dep in pkg['deps'] %} depends = {{ dep }}{% endfor %}{% endif %}{% if pkg['optdeps'] is defined and pkg['optdeps']|length > 0 %}{% for dep in pkg['optdeps'] %} optdepends = {{ dep }}{% endfor %}{% endif %} - source = {{ pkg['srcurl'] }}{% if pkg['srcfile'] is defined %} + source = {{ pkg['srcurl'] }}{% if pkg['srcfile'] is defined and pkg['srcfile'] != false %} source = {{ pkg['srcfile'] }}.sig{% endif %} sha512sums = {{ pkg['srchash'] }}{% if pkg['srcfile'] is defined%} sha512sums = SKIP{% endif %} diff --git a/_docs/PKGBUILD.templates.d.python/vcs.all.j2 b/_docs/PKGBUILD.templates.d.python/vcs.all.j2 index e1a2de0..f229108 100644 --- a/_docs/PKGBUILD.templates.d.python/vcs.all.j2 +++ b/_docs/PKGBUILD.templates.d.python/vcs.all.j2 @@ -1,3 +1,2 @@ -{% for tpl in pkgbuild_list %} -{% include tpl %} +{% for tpl in pkgbuild_list %}{% include tpl %} {% endfor %} diff --git a/bdisk-git b/bdisk-git new file mode 160000 index 0000000..fe34edb --- /dev/null +++ b/bdisk-git @@ -0,0 +1 @@ +Subproject commit fe34edbfc13b8765cde55267477b79aa20a32cec