Re: [gentoo-portage-dev] [PATCH 0 of many] New plug-in sync system

2014-09-04 Thread Michał Górny
Dnia 2014-09-03, o godz. 18:22:15
Brian Dolbec dol...@gentoo.org napisał(a):

 On Wed, 3 Sep 2014 17:35:40 -0700
 Brian Dolbec dol...@gentoo.org wrote:
 
  
  Most of you know about the plugin-sync branch of our portage.git repo.
  I believe it is ready for review and merge into master to become the
  new sync code for the future.
  
  Rather than follow this with 49 patch mails ... I produced a final git
  diff of all the changes.  I have cleaned up and squashed the original
  commits to a point I do not want to squash further.  This will keep
  enough development history for important changes for future
  troubleshooting if it is needed.  Instead of inlining this diff like
  most people prefer, I have attached it.  It is 4.4K+ lines long.
  Probably too long for many email clients.  Plus opeing it in an editor
  will allow the editors syntax highlighting to make code review easier.
  
  I have fully rebased the code on the current master (commit
  582cb806f88 QA patch) and pushed it to both our gentoo repo and our
  github gentoo/portage repo.  For those that wish to review it using
  githubs interface. You have that option too.
  
  Thank you to all those that contributed to the code and testing.
 
 fixed:  bracket spacing  (spotted by mrueg)
 
 diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync
 index 2f0689c..43f92b6 100755
 --- a/bin/emerge-webrsync
 +++ b/bin/emerge-webrsync
 @@ -501,8 +501,8 @@ main() {
  
   # This is a sanity check to help prevent people like funtoo
 users # from accidentally wiping out their git tree.
 - if [[ -n ${repo_sync_type}  ${repo_sync_type} != rsync ]] ;then
 - echo The current sync-type attribute of repository 'gentoo' is 
 not set to 'rsync': 2
 + if [ [ -n ${repo_sync_type} ]  [ ${repo_sync_type} != rsync
 -o ${repo_sync_type} != websync ] ] ; then
 + echo The current sync-type attribute of repository 'gentoo' is 
 not set to 'rsync' or 'websync': 2 echo 2

I don't know what magic this is but you definitely want the old

  [[ -n ${repo_sync_type}  ${repo_sync_type} != rsync ]]

with no extra brackets.

-- 
Best regards,
Michał Górny


signature.asc
Description: PGP signature


Re: [gentoo-portage-dev] [PATCH 0 of many] New plug-in sync system

2014-09-04 Thread Michał Górny
Dnia 2014-09-03, o godz. 23:48:50
Brian Dolbec dol...@gentoo.org napisał(a):

 On Thu, 4 Sep 2014 08:38:29 +0200
 Michał Górny mgo...@gentoo.org wrote:
 
  Dnia 2014-09-03, o godz. 18:22:15
  Brian Dolbec dol...@gentoo.org napisał(a):
  
 
   fixed:  bracket spacing  (spotted by mrueg)
   
   diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync
   index 2f0689c..43f92b6 100755
   --- a/bin/emerge-webrsync
   +++ b/bin/emerge-webrsync
   @@ -501,8 +501,8 @@ main() {

 # This is a sanity check to help prevent people like funtoo
   users # from accidentally wiping out their git tree.
   - if [[ -n ${repo_sync_type}  ${repo_sync_type} != rsync
   ]] ;then
   - echo The current sync-type attribute of
   repository 'gentoo' is not set to 'rsync': 2
   + if [ [ -n ${repo_sync_type} ]  [ ${repo_sync_type} !=
   rsync -o ${repo_sync_type} != websync ] ] ; then
   + echo The current sync-type attribute of
   repository 'gentoo' is not set to 'rsync' or 'websync': 2 echo
   2
  
  I don't know what magic this is but you definitely want the old
  
[[ -n ${repo_sync_type}  ${repo_sync_type} != rsync ]]
  
  with no extra brackets.
  
 
 Looks like some line wrap might be confusing it.  There was an added
 test (condition 2b)in the second half, so needed an extra set of brackets.
 
 if your client wraps this, read it as one line please.
 
 if [[ -n ${repo_sync_type} ]  [ ${repo_sync_type} != rsync -o 
 ${repo_sync_type} != websync ]] ; then
 
 condition 1   ^^^ condition 2a ^^^   
 condition 2b ^^^ 
 
 if it still isn't correct, please reply with it corrected...
 much appreciated :)

[[ -n ${repo_sync_type}  ( ${repo_sync_type} != rsync || ${repo_sync_type} != 
websync ) ]]

?


-- 
Best regards,
Michał Górny


signature.asc
Description: PGP signature


Re: [gentoo-portage-dev] [PATCH 0 of many] New plug-in sync system

2014-09-04 Thread Brian Dolbec
On Thu, 4 Sep 2014 08:54:48 +0200
Michał Górny mgo...@gentoo.org wrote:

 Dnia 2014-09-03, o godz. 23:48:50
 Brian Dolbec dol...@gentoo.org napisał(a):

  if it still isn't correct, please reply with it corrected...
  much appreciated :)
 
 [[ -n ${repo_sync_type}  ( ${repo_sync_type} != rsync ||
 ${repo_sync_type} != websync ) ]]
 

Updated and rebased in.
Thanks.

diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync
index 2f0689c..d784959 100755
@@ -501,8 +501,8 @@ main() {
 
# This is a sanity check to help prevent people like funtoo users
# from accidentally wiping out their git tree.
-   if [[ -n ${repo_sync_type}  ${repo_sync_type} != rsync ]] ; then
-   echo The current sync-type attribute of repository 'gentoo' is 
not set to 'rsync': 2
+   if [[ -n ${repo_sync_type}  ( ${repo_sync_type} != rsync || 
${repo_sync_type} != websync ) ]] ; then
+   echo The current sync-type attribute of repository 'gentoo' is 
not set to 'rsync' or 'websync': 2
echo 2
echo   sync-type=${repo_sync_type} 2
echo 2


-- 
Brian Dolbec dolsen



signature.asc
Description: PGP signature


Re: [gentoo-portage-dev] [PATCH 0 of many] New plug-in sync system

2014-09-03 Thread Brian Dolbec
On Wed, 3 Sep 2014 17:35:40 -0700
Brian Dolbec dol...@gentoo.org wrote:

 
 Most of you know about the plugin-sync branch of our portage.git repo.
 I believe it is ready for review and merge into master to become the
 new sync code for the future.
 
 Rather than follow this with 49 patch mails ... I produced a final git
 diff of all the changes.  I have cleaned up and squashed the original
 commits to a point I do not want to squash further.  This will keep
 enough development history for important changes for future
 troubleshooting if it is needed.  Instead of inlining this diff like
 most people prefer, I have attached it.  It is 4.4K+ lines long.
 Probably too long for many email clients.  Plus opeing it in an editor
 will allow the editors syntax highlighting to make code review easier.
 
 I have fully rebased the code on the current master (commit
 582cb806f88 QA patch) and pushed it to both our gentoo repo and our
 github gentoo/portage repo.  For those that wish to review it using
 githubs interface. You have that option too.
 
 Thank you to all those that contributed to the code and testing.

fixed:  bracket spacing  (spotted by mrueg)

diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync
index 2f0689c..43f92b6 100755
--- a/bin/emerge-webrsync
+++ b/bin/emerge-webrsync
@@ -501,8 +501,8 @@ main() {
 
# This is a sanity check to help prevent people like funtoo
users # from accidentally wiping out their git tree.
-   if [[ -n ${repo_sync_type}  ${repo_sync_type} != rsync ]] ;then
-   echo The current sync-type attribute of repository 'gentoo' is 
not set to 'rsync': 2
+   if [ [ -n ${repo_sync_type} ]  [ ${repo_sync_type} != rsync
-o ${repo_sync_type} != websync ] ] ; then
+   echo The current sync-type attribute of repository 'gentoo' is 
not set to 'rsync' or 'websync': 2 echo 2
-- 
Brian Dolbec dolsen