How to install with yum all python packages except broken?

176

Solution 1

This worked:

~]$ sudo yum install -- '*python*' -python3-queuelib -python-django-federated-login -gcc-python3-plugin -python-qpid_messaging -gcc-python2-plugin -gcc-python3-debug-plugin -python-django* -django* -gcc-python2-debug-plugin -python3-django15-1.5.8-1 python-django-bash-completion* -python-django15*

Solution 2

Alas. nothing but rpm can see file conflicts, which is why Fedora policy is that if a package has them it should have an actual conflict too ... but that's one of many packaging things that don't get checked very well.

It looks like there are only a couple of problems though, so you can do:

yum install -- '*python*' -python3-queuelib -python-django-federated-login
Share:
176

Related videos on Youtube

user1460211
Author by

user1460211

Updated on September 18, 2022

Comments

  • user1460211
    user1460211 almost 2 years

    I have an ArrayList in which the input of dynamically added EditTexts are referenced. I iterate the ArrayList so that I can get all the values of the EditTexts and add them together. However, I do have one non-dynamically added EditText that is already laid out in my layout.xml.

    The problem is that whenever I click my Calculate Button and the only EditText on the screen is the already laid out EditText and it has an input of 1 or any other number, my Calculate Button shows the total input as 0. Whenever I add 1 or more editTexts dynamically, the total input includes the already laid out EditText after I click the Calculate Button.

    I need to get the correct total input even if the only input is the non-dynamic editText.

    int count = 1;
    double gradeValue;
    List<EditText> allEd = new ArrayList<EditText>();
    List<Spinner> allSp = new ArrayList<Spinner>();
    EditText editText1;
    EditText editText2;
    EditText tempText1;
    EditText tempText2;
    Spinner spinner1;
    Spinner spinnerTemp;
    
    
    
    @Override 
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        Button buttonAdd = (Button) findViewById(R.id.button1);
        Button buttonDel = (Button) findViewById(R.id.button2);
        Button buttonCalc = (Button) findViewById(R.id.button3);
    
        spinner1 = (Spinner) findViewById(R.id.spinner1);
        String[] options = new String[13]; 
        options[0] = "A+";
        options[1] = "A";
        options[2] = "A-";
        options[3] = "B+";
        options[4] = "B";
        options[5] = "B-";
        options[6] = "C+";
        options[7] = "C";
        options[8] = "C-";
        options[9] = "D+";
        options[10] = "D";
        options[11] = "D-";
        options[12] = "F";
    
        ArrayAdapter<String> spinnerArrayAdapter = new ArrayAdapter<String>(this,
                android.R.layout.simple_spinner_dropdown_item, options);
        spinnerArrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); // The drop down view
        spinner1.setAdapter(spinnerArrayAdapter);
    
        allEd.add(editText2);
        allSp.add(spinner1);
    
        buttonAdd.setOnClickListener(this);
        buttonDel.setOnClickListener(this);
        buttonCalc.setOnClickListener(this);
    
    
    }
    
    
    @SuppressWarnings("deprecation")
    public void onClick(View v) {
        TableLayout tableLayout1 = (TableLayout) findViewById(R.id.tableLayout1);
    
        switch(v.getId()){
        case R.id.button1:
            if(count != 16){
                count++;
    
                // Create the row only when the add button is clicked
                TableRow tempRow = new TableRow(MainActivity.this);
                EditText tempText1 = new EditText(MainActivity.this);
                EditText tempText2 = new EditText(MainActivity.this);
                TextView tempTextView = new TextView(MainActivity.this);
                Spinner spinnerTemp = new Spinner(MainActivity.this);
                editText1 = (EditText) findViewById(R.id.editText1);
                editText2 = (EditText) findViewById(R.id.editText2);
                TextView textView3 = (TextView) findViewById(R.id.textView3);
                tempTextView.setText(count + ".");
    
                tempRow.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
                tempText1.setLayoutParams(editText1.getLayoutParams());
                tempText2.setLayoutParams(editText2.getLayoutParams());
                tempTextView.setLayoutParams(textView3.getLayoutParams());
                tempText1.setInputType(InputType.TYPE_CLASS_TEXT);
                tempText2.setInputType(InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_FLAG_DECIMAL);
                tempText2.setId(count);
                spinnerTemp.setLayoutParams(spinner1.getLayoutParams());
                spinnerTemp.setId(count);
                String options[] = { "A+", "A", "A-", "B+", "B", "B-", "C+", "C", "C-", "D+", "D", "D-", "F" };
    
                ArrayAdapter<String> spinnerArrayAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_dropdown_item, options);
                spinnerArrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); // The drop down view
                spinnerTemp.setAdapter(spinnerArrayAdapter);
    
                allEd.add(tempText2);
                allSp.add(spinnerTemp);
    
    
    
                tempRow.addView(tempTextView);
                tempRow.addView(tempText1);
                tempRow.addView(tempText2);
                tempRow.addView(spinnerTemp);
                tableLayout1.addView(tempRow);
            } else {
                final AlertDialog alertDialog = new AlertDialog.Builder(MainActivity.this).create(); //Read Update
                alertDialog.setTitle("Error");
                alertDialog.setMessage("You can only have up to 16 rows!");
    
                alertDialog.setButton("Ok", new DialogInterface.OnClickListener() {
                    public void onClick(DialogInterface dialog, int which) {
                        alertDialog.dismiss();
                    }
                });
    
                alertDialog.show();
            }
            break;
    
    
    
    
    case R.id.button3:
            int calculation = 0;
            for(int i = 0; i < allEd.size(); i++) {
                EditText totalUnits = allEd.get(i);
                try {
                int units = Integer.parseInt(totalUnits.getText().toString());
    
                calculation += units;
                }catch (Exception e) {
                    //ignore
                }
    
            }
            double grade = 0;
            for(int i = 0; i < allSp.size(); i++) {
                    double gradeValue = calcGradeValue(allSp.get(i).getSelectedItemPosition()); 
                    try {
                    double calculation1 = (gradeValue) * (Integer.parseInt(allEd.get(i).getText().toString()));
    
                    grade += calculation1;
                    }catch (Exception e) {
                        //ignore
                    }
                }
    
            final AlertDialog alertDialog = new AlertDialog.Builder(MainActivity.this).create(); //Read Update
            alertDialog.setTitle("Your calculated GPA");
            alertDialog.setMessage("Your calculated GPA is: " + (grade));
            alertDialog.setButton("Ok", new DialogInterface.OnClickListener() {
                public void onClick(DialogInterface dialog, int which) {
                    alertDialog.dismiss();
                }
            });
    
            alertDialog.show();
    
    • Vlad
      Vlad over 11 years
      How do you add EditTexts to allEd?
    • kennytm
      kennytm over 11 years
      It's easier to read if there is less bold text. :)
    • user1460211
      user1460211 over 11 years
      The dynamically added EditTexts are added by "allEd.add(tempText2);" and the non dynamic EditText is added by "allEd.add(editText2);"
    • SJuan76
      SJuan76 over 11 years
      You can use ` to mark code words, it is easier for the reader than bold type
    • jaredad7
      jaredad7 about 10 years
      Have you tried running yum remove *python* or yum clean *python* or yum clean all or any combination?
    • somethingSomething
      somethingSomething about 10 years
      @jaredad7 I can try that tomorrow. Don't have Wifi, where I am.
  • user1460211
    user1460211 over 11 years
    I noticed that I had my "allEd.add(editText2);" (the already layed out editText) in the button1 case. I moved it out and put it in my onCreate, but it still does the same thing.
  • user1460211
    user1460211 over 11 years
    Ok, nevermind. It wasn't working because I overlooked that I had not defined editText2 by R.id.editText2 in onCreate after I had moved it there. Thank you! Sorry that I had not noticed this small error. I thought it was something bigger. Thank you and sorry!
  • somethingSomething
    somethingSomething about 10 years
    ]$ sudo yum install -- 'python' -python3-queuelib -python-django-federated-login -python-django-bash-completion* -gcc-python3-plugin -python-qpid_messaging -gcc-python2-plugin -gcc-python3-debug-plugin -gcc-python2-debug-plugin -python3-django15-1.5.8-1.fc20.noarc Total size: 1.0 G Is this ok [y/d/N]: y Downloading packages: Running transaction check Running transaction test Transaction check error: file /etc/bash_completion.d/django_bash_completion conflicts between attempted installs of python3-django15-1.5.8-1.fc20.noarch and python-django-bash-completion-1.6.5-1.fc20.noarch